/**
 * Created by wubo on 2018/3/7.
 */
define(function(require, exports, module) {
    require("../../common/js/common");
    require("./sh.menu");

    var EventHub = require("../../common/js/event");
    var router = require("./sh.router.js");

    var shApp = new Vue({
        el: '#shApp',
        router:router,
        data:function(){
            return {
                message:""
            };
        },
        methods:{
            loadData:function(){
                console.log("加载数据")
            }
        },
        created: function () {
        },
        mounted:function(){
            var self = this;
            this.loadData();

            self.$router.addRoutes([
                { path: '/module/install'},
                { path: '/security'},
                { path: '/element/index'}
            ]);

            EventHub.$on("menuItemClick",function(data){
                self.$router.push(data);
            });
        }
    })
});